---
title: "Accessibility Checker Rule Help: WCAG20_Select_HasOptGroup"
---
import "../../../styles/ToolHelp.scss"
import { CodeSnippet, Tag } from "carbon-components-react";

<div className="toolHelp">
<Row>
<Column colLg={16} colMd={8} colSm={4} className="toolHead">

### Group of related options may need `<optgroup>`

<div id="locLevel"></div>

Groups of related options within a selection list should be grouped with `<optgroup>`

</Column>
</Row>
<Row>
<Column colLg={11} colMd={5} colSm={4} className="toolMain">

### Why is this important?

By grouping related content, users can navigate to the content they want more quickly.

<div id="locSnippet"></div>

### What to do

 * Use the `<optgroup>` element to group `<option>` elements inside a `<select>` element. Use the `"label"` attribute so that users will know what content to expect inside the group;
 * AND, place the `<optgroup>` element directly inside the `<select>` element, and place the `<option>` elements directly inside the `<optgroup>`.

</Column>
<Column colLg={5} colMd={3} colSm={4} className="toolLeft">

### About this requirement

[IBM 1.3.1 Info and Relationships](https://www.ibm.com/able/requirements/requirements/#1_3_1)

### Who does this affect?

 * People using a screen reader, including blind, low vision and neurodivergent people
 * People who rely on keyboard control

</Column>
</Row>
</div>

export default ({ children, _frontmatter }) => (<React.Fragment>{children}</React.Fragment>)
